package the.broccoli.uc.service;

import org.wisteria.framework.web.mvc.service.ISuperService;
import the.broccoli.uc.entity.UserRole;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 用户与角色 服务类
 * </p>
 *
 * @author lei.liu
 * @since 2020-04-09
 */
public interface IUserRoleService extends ISuperService<UserRole> {
    void save(String userId, List<String> roleIdList, String createdId, String createdName);

    void save(List<String> userIdList, String roleId, String createdId, String createdName);

    List<String> getRoleIdList(String userId);

    /**
     * 获取用户关联的所有角色编码
     * @param userId    用户ID
     * @return
     */
    Set<String> getRoleCodeList(String userId);

    List<UserRole> listByRoleId(String roleId);


}
